import axios from '../utils/index';
import { Pat } from '@/typings/request';
import { requestInt } from '@/utils/service';
/**
 *  获取文章列表
 *  @param {*} data
 */
export function articleList(data: any) {
    return requestInt({
        url: '/eq/article/list',
        method: 'get',
        data,
    });
}
/**
 *  新增文章
 *  @param {*} data
 */
export function addArticle(data: any) {
    return requestInt({
        url: '/eq/article',
        method: 'post',
        data,
    });
}
/**
 *  更新文章
 *  @param {*} data
 */
export function updateArticleId(data: any) {
    return requestInt({
        url: `/eq/article/${data.articleId}`,
        method: 'put',
        data,
    });
}
/**
 *  删除文章
 *  @param {*} data
 */
export function delArticleId(data: any) {
    return requestInt({
        url: `/eq/article/${data.articleId}`,
        method: 'delete',
        data,
    });
}
/**
 *  获取文章详情
 *  @param {*} data
 */
export function articleDetail(data: any) {
    return requestInt({
        url: `/eq/article/detail`,
        method: 'get',
        data,
    });
}

/**
 *  获取临时上传文件的连接
 *  @param {*} data
 */
export function uploadPresignedUrl(data: any) {
    return requestInt({
        url: `/upload/presigned-url?extName=${data.extName}`,
        method: 'get',
        data,
    });
}

/**
 *  获取技能列表
 *  @param {*} data
 */
export function skillTypeList(data: any) {
    return requestInt({
        url: `/eq/skill-type/list`,
        method: 'get',
        data,
    });
}
